package com.tkx.dxb.service.edu.controller.admin;

import com.tkx.dxb.common.base.result.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author : victor
 * @since : 2020/10/31
 */
//@CrossOrigin
@RestController
@RequestMapping("/user")
public class LoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");

    }

    @GetMapping("info")
    public R info(){
        return R.ok().data("name","admin")
                .data("roles","[admin]")
                .data("avatar","https://dxbedu.oss-cn-chengdu.aliyuncs.com/avatar/master.jpg");
    }

    @PostMapping("logout")
    public R logout(){
        return R.ok();
    }

}
